function y=roundto_sigfigs(x,num_decimal_places)

mx=max(x);

y=mx*roundto(x/mx,num_decimal_places);